package com.wqz.day.day.up.enums;

import java.util.EnumSet;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 *
 */
public enum CreditScoreDimensionEnum {
    COMAPNY_BACKGROUD("companyBackGround", "企业背景"),
    PERFORMANCE_HISTORY("performanceHistory", "履约历史"),
    MANAGEMENT_LEVEL("managementLevel", "管理水平"),
    QUALIFICATION_EVALUATION("qualificationEvaluation", "资质评价"),
    PERFORMANCE("performance", "经营状况"),

    ;

    CreditScoreDimensionEnum(String code, String descp){
        this.code = code;
        this.descp = descp;
    }

    private final String code;
    private final String descp;


    public String getCode() {
        return code;
    }
    public String getDescp() {
        return descp;
    }

    public static Map<String, CreditScoreDimensionEnum> creditScoreDimensionEnumMap() {
        Map<String, CreditScoreDimensionEnum> personNameMap = EnumSet.allOf(CreditScoreDimensionEnum.class).stream()
                .collect(Collectors.toMap(CreditScoreDimensionEnum::getDescp, Function.identity()));

        return personNameMap;
    }
}
